package com.zhouyu.service;

import com.zhouyu.aspect.bean.User;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Scope;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.context.annotation.RequestScope;

import javax.annotation.PostConstruct;

/**
 * @author 拾光
 */

@Component
// @Scope("singleton")
// public class UserService implements InstantiationAwareBeanPostProcessor {
public class UserService  implements UserInterface{
// public class UserService {

	//
	@Autowired
	private OrderService orderService;


	@Override
	public void test() {
		// System.out.println(orderService);
		System.out.println("test方法打印");
	}

	@Override
	public void a() {
		System.out.println("a方法打印");
	}

	// @Override
	// public Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException {
	// 	if (beanName.equals("userService")){
    //   		System.out.println("userService实例化之前");
	// 	}
	// 	return User.class;
	// }


	// @Override
	// public boolean postProcessAfterInstantiation(Object bean, String beanName) throws BeansException {
    // System.out.println("测试");
	// 	return false;
	// }
}
